package com.changli06._abstract.exer2;

public class SalariedEmployee extends Employee{
    private double  monthlySalary;

    public SalariedEmployee(double monthlySalary) {
        this.monthlySalary = monthlySalary;
    }

    public SalariedEmployee(String name, int number, MyDate birthday, double monthlySalary) {
        super(name, number, birthday);
        this.monthlySalary = monthlySalary;
    }

    public SalariedEmployee(int monthlySalary) {
        this.monthlySalary = monthlySalary;
    }
    public double earnings(){
        return monthlySalary;
    }

    @Override
    public String toString() {
        return "SalariedEmployee"+super.toString();
    }
}
